<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ page import="net.comm.tags.JstlFun" %>
<%@ page import="net.comm.shequ.service.impl.WyMemberServiceImpl" %>
<%@ page import="net.comm.shequ.web.form.WyMemberForm" %>
<%@ page import="net.comm.common.ReturnMessage" %>

<% 
		try {
			request.setCharacterEncoding("UTF-8"); 
			response.setCharacterEncoding("UTF-8"); 
		} catch (Exception e) {
			e.printStackTrace();
		}
		//不缓存页面
		response.setHeader("Cache-Control","no-store");
		response.setHeader("Pragrma","no-cache");
		response.setDateHeader("Expires",0);

		String userID = request.getParameter("userID");
		if(userID == null || userID.equals("")){
		
			userID = "0";
		}
		String wuyeID = request.getParameter("wuyeID");
		int ret = 0;

		String sb = ""; 
		response.addHeader("Content-Type","text/html"); 
		
		if(Integer.valueOf(userID) >0){
					
			//判断该会员是否已经加入委员会
			WyMemberServiceImpl service = new WyMemberServiceImpl();
			WyMemberForm wymemForm = new WyMemberForm();
			ReturnMessage msg  = new ReturnMessage();

			wymemForm.setWuyeID(Integer.valueOf(wuyeID));
			wymemForm.setUserID(Integer.valueOf(userID));

			service.get(wymemForm,msg);

			if(msg.getErrCode() == 0){
				sb = "已经是物业成员";
			}else{
				sb = JstlFun.GetUserNick(Integer.valueOf(userID));		
			}

		}
		response.getWriter().write(sb); 		
 %>       
